﻿namespace BOBOScript.Script
{
    public static class Compiler
    {
        //从单个文件中编译
        public static void CompileFromFile(string FilePath)
        {
            var text = Tools.ReadTextFromFile(FilePath);
            if (!text.Success)
            {
                return;
            }
            List<string> lines = new List<string>();
            lines =text.ret.Split('\n').ToList();
            Tools.去除注释(ref lines);
            var dy=括号单元.获取单元(ref lines);
            foreach (var line in dy) 
            {
                Console.WriteLine($"{line.类型} {line.开始位置} {line.结束位置}");
            }
        }
    }
}
